<template>
    <el-dialog title="审批" :visible="isShow" center top="11vh" width="400px" @close="close">
        <el-form :model="model" size="small" label-suffix=":" ref="typeModel" label-width="108px">
            <el-row>
                <el-col :span="24">
                    <el-form-item v-bind:label="viewFileLabel" style="width:100%">
                        <!-- <file-upload :limit="1" bizType="onceTrialDoc" :otherList="onceTrialDocFile" :bizId="typeModel.inspectionId"
                             disabled   v-model="typeModel.onceTrialDoc" @change="(fileList)=>picChange(fileList,'onceTrialDoc')"></file-upload> -->
                        <a class="download-item"
                            href="http://172.16.202.25:9000/test/2023/10/12/57675a26-b999-431f-8e31-c1dd6897df5f.xlsx">试制文件</a>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row :gutter="24" class="dia">

                <el-col :span="24">
                    <el-form-item :label="model.isSecond ? $t('trialinvestment.Secondary') : $t('trialinvestment.Onceary')"
                        prop="model.result">
                        <el-radio-group v-model="model.result" class="smallRadio">
                            <el-radio :label="'1'"> {{ $t('inventoryManagement.pass') }} </el-radio>
                            <el-radio :label="'0'"> {{ $t('inventoryManagement.fail') }} </el-radio>

                        </el-radio-group>
                    </el-form-item>
                </el-col>

            </el-row>
            <el-row v-if="model.result == '0'">
                <el-col :span="24">
                    <el-form-item :label="$t('trialinvestment.ifTwiceTryProduce')" prop="model.secondTrial">
                        <el-radio-group v-model="model.secondTrial" class="smallRadio">
                            <el-radio :label="'1'"> {{ $t('public.yes') }} </el-radio>
                            <el-radio :label="'0'"> {{ $t('public.no') }} </el-radio>

                        </el-radio-group>
                    </el-form-item>
                </el-col>

            </el-row>
        </el-form>
        <div slot="footer" class="dialog-footer">
            <el-button type="primary" @click="close" icon="el-icon-document" size="small">{{ $t('public.cancel') }}
            </el-button>
            <el-button type="primary" @click="submit" icon="el-icon-document" size="small">{{ $t('public.save') }}
            </el-button>
        </div>
    </el-dialog>
</template>

<script>


export default {

    props: {
        model: {
            type: Object,
        },
        visible: {
            type: Boolean,
            default: false,
        }
        //,type: [String, Number], //1:新增  2：编辑 3：查看
    },
    // watch: {
    //     value(val) {
    //         this.dialogForm = { ...val }
    //     },
    // },
    computed: {
        isShow: {
            get() {
                return this.visible;
            }
        },
        viewFileLabel: {
            get() {
                return this.$t('trialinvestment.viewAttachment');
            }

        }

    },
    data() {
        return {

        }
    },
    methods: {
        close() {
            this.visible = false;
        },
        submit() {
            this.visible = false;
        }
    },
}
</script>

<style scoped>
.dialog-footer {
    text-align: right;
    margin-right: 1.25rem;
}

.dialog-footer button {
    margin-right: 1.0rem;
    width: 6.25rem;
}

a {
    text-decoration: underline;
}

a:hover {
    color: #6ea2d7;
}
</style>
